#ifndef ENUMERATION_PROXY_H
#define ENUMERATION_PROXY_H

#include "abstracttypeproxy.h"

#include <enumeration.h>

#include <QtScript/QScriptValue>

namespace wfnet
{

class EnumerationProxy : public AbstractTypeProxy
{
    Q_OBJECT
public:
    Q_INVOKABLE EnumerationProxy(QObject* parent = 0);
    EnumerationProxy(const EnumerationProxy& proxy);
    ~EnumerationProxy();

    void setValue(const QVariant& value);
    const core::Type* getValue() const;

    Q_INVOKABLE QScriptValue equal(const QScriptValue& other);
    Q_INVOKABLE QScriptValue notEqual(const QScriptValue& other);

    void setIdentity(const core::Type& type);

public:
    static const QString NAME;

private:
    core::Enumeration m_value;
};

} // namespace wfnet

Q_DECLARE_METATYPE(wfnet::EnumerationProxy)

#endif
